/* 全局样式 */
:root {
    --bg-color: #000;
    --text-color: #fff;
    --header-bg: rgba(0, 0, 0, 0.5);
    --nav-hover: #ff6b6b;
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(255, 255, 255, 0.05);
    --fractal-bg: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] {
    --bg-color: #fff;
    --text-color: #000;
    --header-bg: rgba(255, 255, 255, 0.5);
    --nav-hover: #ff6b6b;
    --input-bg: rgba(0, 0, 0, 0.05);
    --input-border: rgba(0, 0, 0, 0.1);
    --card-bg: rgba(0, 0, 0, 0.05);
    --fractal-bg: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* 头部样式 */
header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--input-border);
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
}

nav a:hover {
    color: var(--nav-hover);
    background: var(--card-bg);
    cursor: url('wand-cursor.svg'), auto;
}

/* 主题切换按钮 */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: url('wand-cursor.svg'), pointer;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.theme-toggle:hover {
    background: var(--card-bg);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    z-index: 101;
    border: 1px solid var(--input-border);
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    display: block;
    transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
    background: var(--card-bg);
    color: var(--nav-hover);
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 英雄区域样式 */
.hero {
    height: 100vh;
    width: 100vw;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--bg-color);
}

.fractal-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: var(--bg-color);
}

canvas {
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.hero-content p {
    font-size: 1.5rem;
    opacity: 0.8;
}

/* 画廊样式 */
.gallery {
    padding: 100px 0;
}

.gallery h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
}

/* 关于区域样式 */
.about {
    padding: 100px 0;
    text-align: center;
}

.about h2 {
    margin-bottom: 30px;
    font-size: 2.5rem;
}

/* 页脚样式 */
footer {
    padding: 20px 0;
    text-align: center;
    opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    .dropdown-content {
        position: fixed;
        width: 100%;
        left: 0;
        right: 0;
        border-radius: 0;
    }
}